K, I am use to PHP programing so this is why I am a little confused, I have sat down and layed out what I want to program, its a small game that is texted based and I am sure I will laught at it later on, but I need to start somewhere. Anyways what I want if for a variable or array to have other variables inside it, basicly an array but instead of having numbers for the indexs I want names. here is example.
player1[lifes] = 100
player1[score] = 200
player1[homeland] = "eldar"
something like that, I think when playing with VB a while back (sorry if VB is a bad word here, i promis not to use it anymore) there was something you could do like
player1.lifes = 100
player1.score = 100
player1.homeland = "eldar"
I know I can use standard variables, but this looks SO much cleaner and makes ALOT more sence. However I am not sure how to do it, This is one way I come up with, but I feel that it is Geto Rigged and that there is probebly a better way out there, please let me know if there is.
int player1[10];
int life;
life = 1;
player1[life]=100;
cout << player1[life];
cin.get();